{**
 * SDTT.tpl: hien thi cho xem cac tai khoan trong DMuc
 *
 * Copyright (c) 2003-2012 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * Display list of sections in journal management.
 *{include file="common/header.tpl"}
 * <tr valign="top">
	<td width="20%" class="label"><label for="mant">Lo&#7841;i ti&#7873;n:*</label></td>
	<td width="30%" class="value"><input type="text" style="text-transform:uppercase;" name="mant" value="{$loaitien}" id="mant" onkeyup="ShowHint(this.value, '{$dmnts}', 'txtHintMANT', 'mant', '</br>')" onblur="ExitMa(this.id,'txtHintMANT', '{$dmnts}')" onfocus="EntertMa(this.id,'txtHintMANT', '{$dmnts}')" size="15" maxlength="120" class="textField" /></td>
	<td width="40%" class="value"><div id="txtHintMANT"></div></td>
</tr>
<div id="div1" style="margin: 0 auto; border:1px solid black;background-color:Beige ;">
 *
 * $Id$
 *}


 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset={$defaultCharset|escape}" />
	<link rel="stylesheet" href="{$baseUrl}/lib/pkp/styles/pkp.css" type="text/css" />
	<link href='http://fonts.googleapis.com/css?family=ABeeZee' rel='stylesheet' type='text/css'>

	<link rel="stylesheet" href="{$baseUrl}/lib/pkp/styles/common.css" type="text/css" />
	<link rel="stylesheet" href="{$baseUrl}/styles/common.css" type="text/css" />

	<!-- Base Jquery -->
	{if $allowCDN}<script type="text/javascript" src="http://www.google.com/jsapi"></script>
	<script type="text/javascript">{literal}
		// Provide a local fallback if the CDN cannot be reached
		if (typeof google == 'undefined') {
			document.write(unescape("%3Cscript src='{/literal}{$baseUrl}{literal}/lib/pkp/js/lib/jquery/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
			document.write(unescape("%3Cscript src='{/literal}{$baseUrl}{literal}/lib/pkp/js/lib/jquery/plugins/jqueryUi.min.js' type='text/javascript'%3E%3C/script%3E"));
		} else {
			google.load("jquery", "{/literal}{$smarty.const.CDN_JQUERY_VERSION}{literal}");
			google.load("jqueryui", "{/literal}{$smarty.const.CDN_JQUERY_UI_VERSION}{literal}");
		}
	{/literal}</script>
	{else}
	<script type="text/javascript" src="{$baseUrl}/lib/pkp/js/lib/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="{$baseUrl}/lib/pkp/js/lib/jquery/plugins/jqueryUi.min.js"></script>
	{/if}

	<script type="text/javascript" src="{$baseUrl}/classes/acct/js/ShowHintMATK.js"></script>

</head>

<body onload='javascript:document.getElementById("soct").focus();'>

{strip}
{assign var="pageTitle" value="Chung tu"}
{if ($loaitien) != 'VND' }
	{assign var="socot" value="6"}
{else}
	{assign var="socot" value="5"}
{/if}

{assign var="ngct" value=$smarty.now|date_format:"%d/%m/%Y"}
{/strip}

</br>
<table id="head" width="100%">
<tr valign="center">
	<td width="15%"><div class="css_corner">{$action}</div></td>
	<td width="85%" class="title" style = "text-align: center" ><strong>{$loaiphieu} ({$loaitien}) - N. {$xNam}</strong></td>
</tr>

</table>


</br>
<form name="CTTMTG" id="CTTMTG" method="post" action="{url nam= $xNam  EditMode = "save" }" onsubmit="return false;">

<table id= "mymain"  width="90%" align = "center" cellspacing="0" >
<tr valign="top">
	<td width="10%" ></td>
	<td width="10%" ></td>
	<td width="5%" ></td>
	<td width="10%" ></td>
	<td width="10%"></td>
	<td width="10%"></td>
	<td width="10%"></td>
	<td width="10%"></td>
	<td width="10%"></td>
	<td width="10%"></td>
</tr>

<tr valign="top">
	<td colspan = "2"  align = "right" class="mylabel"><label for="soct">S&#7889; ch&#7913;ng t&#7915;:</label></td>
	<td colspan = "3" class="value" ><input type="text" name="soct" value="{$soct}" id="soct" style="width:99%" class="textField" /></td>

	<td colspan = "2"   align = "right"  class="mylabel"><label for="ngct">Ng&#224;y ch&#7913;ng t&#7915;:</label></td>

	<td colspan = "2" class="value"><input type="text" name="ngct" value="{$ngct}" id="datepicker" onkeydown="javascript:if (event.keyCode == 13) document.getElementById('hoten').focus()" class="textField" /></td>
	<td colspan = "1"></td>
</tr>
<tr valign="top">
	<td colspan = "2"  align = "right"  class="mylabel"><label for="hoten">H&#7885; t&#234;n:</label></td>
	<td colspan = "5" class="value"><input type="text" name="hoten" value="{$hoten}" id="hoten" style="width:99%" class="textField" /></td>
	<td colspan = "3"></td>

</tr>

<tr valign="top">
	<td colspan = "2"   align = "right"  class="mylabel"><label for="diachi">&#272;&#7883;a ch&#7881;:</label></td>
	<td colspan = "5" class="value"><input type="text" name="diachi" value="{$diachi}" id="diachi" class="textField" style="width:99%" /></td>
	<td colspan = "3"></td>
</tr>

<tr valign="top">
	<td colspan = "2"  align = "right"   class="label"><label for="lydo">L&#253; do:</label></td>
	<td colspan = "5" class="value"><input type="text" name="lydo" value="{$lydo}" id="lydo" class="textField" style="width:99%" /></td>
	<td colspan = "2" class="mylabel"><label for="solgctg">S&#7889; CTG k&#232;m theo:</label></td>
	<td class="value"><input type="text" name="solgctg" value="{$solgctg}" id="solgctg" size="2" class="textField" /></td>

</tr>

{if (1 == 2) }
<tr valign="top">
	<td colspan = "2"   align = "right"  class="mylabel"><label for="sotien">S&#7889; ti&#7873;n:</label></td>
	<td colspan = "8" class="value"><input type="text" name="sotienvn" style="text-align:right"   onblur="return addCommas(this.value, this.id)" onkeypress="return isNumberKey(event)" value="{$sotienvn}" id="sotienvn"  size="25" class="textField"/>
	<label for="sotien">{$loaitien}</label>
	</td>
</tr>
{/if}


{if ($loaitk|substr:0:3) == '112' }
<tr valign="top">
	<td colspan = "2"  align = "right" class="mylabel"><label for="madv">M&#227; Ng.H&#224;ng:</label> </td>
	<td colspan = "8" class="value"><input type="text" name="madv" value="" id="madv" onkeyup="ShowHint(this.value, '{$dmdvs}', '', this.id, '')" onblur="ExitMa(this.id,'txtHintMADV', '{$dmdvs}')"  class="textField" /> <div   style="font-size:11px" ></div> </td>
	
</tr>
{/if}


{if ($loaitien) != 'VND' }
<tr valign="top">
	<td colspan = "2"  align = "right" class="mylabel"><label for="tygia">T&#7927; gi&#225;:</label></td>
	<td colspan = "2" class="value"><input type="text" name="tygia" value="" id="tygia" style="text-align:right"   onblur="validTyGia(this.value, this.id)" onkeypress="return isNumberKey(event)" class="textField" /></td>
</tr>
{/if}

<tr valign="top">
	<td colspan = "2"  align = "right" class="mylabel"><label for="matk">{$lTK}:</label></td>
	<td class="value"><input type="text" name="matk" value="{$loaitk}" id="matk" onkeyup="ShowHint(this.value, '{$dmtktmtgs}', 'txtHintMATK', 'matk', '</br>')" onblur="ExitMa(this.id,'txtHintMATK', '{$dmtktmtgs}')"  size="10" maxlength="20" class="textField" /></td>
	<td colspan = "7" class="value"><div id="txtHintMATK"></div></td>
</tr>
</table>



<div class="separator" style="padding-top: 10px;"></div>

<table id="myDetail">
<thead>
<tr height = "40">
	{if ($loaitien) != 'VND' }
		<th width="5%" name="tkdu" >{$lTKDU}</th>
		<th width="10%" name="chitiettkdu"  >Chi ti&#7871;t TK</th>
		<th width="10%" name="sotiennt" >S&#7889; t&#7873;n {$loaitien}</th>
		<th width="10%" name="sotienvn" >S&#7889; t&#7873;n VN&#272;</th>
		<th width="50%" name="diengiai"  >Di&#7877;n gi&#7843;i</th>
		<th width="15%" name="BBB" align="right">{translate key="common.action"}</th>
	{else}
		<th width="5%" name="tkdu" >{$lTKDU}</th>
		<th width="10%" name="chitiettkdu"  >Chi ti&#7871;t TK</th>
		<th width="10%" name="sotienvn" >S&#7889; t&#7873;n VN&#272;</th>
		<th width="60%" name="diengiai"  >Di&#7877;n gi&#7843;i</th>
		<th width="15%" name="BBB" align="right">{translate key="common.action"}</th>
	{/if}

</tr>
<tr >
</tr>
</thead>


<tr class="mydatarow" rowspan = "2">
	<td valign="top"><input type="text" style="vertical-align:top" name="tkdu" value="" id="tkdu-1" size = "10" onkeyup="ShowHint(this.value, '{$dmtks}', 'txtHintMATK2', this.id, '&nbsp; &nbsp; &nbsp;')" onblur="ExitMa(this.id,'txtHintMATK2', '{$dmtks}')" class="textField" /><div id lblMATK  style="font-size:11px" ></div></td>

	<td valign="top"><input size = "10" style="vertical-align:top"  type="text" name="chitiettkdu" value="" id="chitiettkdu-1" class="textField" onkeyup="ShowHintCTTK(this.value, '{$dmtkCTs}','{$dmdvs}', '{$dmdvs}', this.id, '&nbsp; &nbsp; &nbsp;')" 
	onblur="ExitMaCTTK(this.id,'{$dmtkCTs}','{$dmdvs}', '{$dmdvs}')" /><div id lblCTTKDU  style="font-size:11px" ></td>

	{if ($loaitien) != 'VND' }
		<td valign="top" class="value"><input size = "10" type="text" name="sotiennt" value="" id="sotiennt-1" style="text-align:right"  onblur="validSoTienNT(this.value, this.id, 2)" onkeypress="return isNumberKey(event)" id="sotiennt-1" class="textField" /></td>

		<td valign="top" class="value"><input type="text" name="sotienvn" value="" id="sotienvn-1" style="text-align:right"   onblur="return validSoTienVN(this.value, this.id,3)" onkeypress="return isNumberKey(event)" class="textField" /></td>
	{else}
		<td valign="top" class="value"><input type="text" name="sotienvn" value="" id="sotienvn-1" style="text-align:right"   onblur="return validSoTienVN(this.value, this.id,2)" onkeypress="return isNumberKey(event)" class="textField" /></td>


	{/if}


	<td valign="top" class="value" ><input type="text" name="diengiai" value="" id="diengiai-1"  style="width:99%"   class="textField" /></td>
	<td valign="top" align="right" id = 'mytd'>
	<a class="actiondelrow" id = "rowdel-1" href="javascript:void(0);" onclick="delerow(this.id,2);">-X&#243;a d&#242;ng</a>  
	</td>
</tr>

<tr class="mydatarow" rowspan = "2"> 
	<td valign="top"><input type="text" style="vertical-align:top" name="tkdu" value="" id="tkdu-2" size = "10" onkeyup="ShowHint(this.value, '{$dmtks}', 'txtHintMATK2', this.id, '&nbsp; &nbsp; &nbsp;')" onblur="ExitMa(this.id,'txtHintMATK2', '{$dmtks}')" class="textField" /><div id lblMATK  style="font-size:11px" ></div></td>

	<td valign="top"><input size = "10" style="vertical-align:top"  type="text" name="chitiettkdu" value="" id="chitiettkdu-2" class="textField" onkeyup="ShowHintCTTK(this.value, '{$dmtkCTs}','{$dmdvs}', '{$dmdvs}', this.id, '&nbsp; &nbsp; &nbsp;')" 
	onblur="ExitMaCTTK(this.id,'{$dmtkCTs}','{$dmdvs}', '{$dmdvs}')" /><div id lblCTTKDU  style="font-size:11px" ></td>


	{if ($loaitien) != 'VND' }
		<td valign="top" class="value"><input size = "10" type="text" name="sotiennt" value="" id="sotiennt-2" style="text-align:right"   onblur="return validSoTienNT(this.value, this.id, 2)" onkeypress="return isNumberKey(event)" id="sotiennt-1" class="textField" /></td>

		<td valign="top" class="value"><input type="text" name="sotienvn" value="" id="sotienvn-2" style="text-align:right"   onblur="return validSoTienVN(this.value, this.id,3)" onkeypress="return isNumberKey(event)" class="textField" /></td>
	{else}
		<td valign="top" class="value"><input type="text" name="sotienvn" value="" id="sotienvn-2" style="text-align:right"   onblur="return validSoTienVN(this.value, this.id,2)" onkeypress="return isNumberKey(event)" class="textField" /></td>


	{/if}


	<td valign="top" class="value" ><input type="text" name="diengiai" value="" id="diengiai-2"  style="width:99%"   class="textField" /></td>
	<td valign="top" align="right" id = 'mytd'>
	<a class="actiondelrow"  id = "rowdel-2" href="javascript:void(0);" onclick="delerow(this.id,2);">-X&#243;a d&#242;ng</a>  
	</td>
</tr>

<tr class="mydatarow" rowspan = "2">
	<td valign="top"><input type="text" style="vertical-align:top" name="tkdu" value="" id="tkdu-3" size = "10" onkeyup="ShowHint(this.value, '{$dmtks}', 'txtHintMATK2', this.id, '&nbsp; &nbsp; &nbsp;')" onblur="ExitMa(this.id,'txtHintMATK2', '{$dmtks}')" class="textField" /><div id lblMATK  style="font-size:11px" ></div></td>

	<td valign="top"><input size = "10" style="vertical-align:top"  type="text" name="chitiettkdu" value="" id="chitiettkdu-3" class="textField" onkeyup="ShowHintCTTK(this.value, '{$dmtkCTs}','{$dmdvs}', '{$dmdvs}', this.id, '&nbsp; &nbsp; &nbsp;')" 
	onblur="ExitMaCTTK(this.id,'{$dmtkCTs}','{$dmdvs}', '{$dmdvs}')" /><div id lblCTTKDU  style="font-size:11px" ></td>

	{if ($loaitien) != 'VND' }
		<td valign="top" class="value"><input size = "10" type="text" name="sotiennt" value="" id="sotiennt-3" style="text-align:right"   onblur="return validSoTienNT(this.value, this.id, 2)" onkeypress="return isNumberKey(event)" id="sotiennt-1" class="textField" /></td>

		<td valign="top" class="value"><input type="text" name="sotienvn" value="" id="sotienvn-3" style="text-align:right"   onblur="return validSoTienVN(this.value, this.id,3)" onkeypress="return isNumberKey(event)" class="textField" /></td>
	{else}
		<td valign="top" class="value"><input type="text" name="sotienvn" value="" id="sotienvn-3" style="text-align:right"   onblur="return validSoTienVN(this.value, this.id,2)" onkeypress="return isNumberKey(event)" class="textField" /></td>


	{/if}


	<td valign="top" class="value" ><input type="text" name="diengiai" value="" id="diengiai-3"  style="width:99%"   class="textField" /></td>
	<td valign="top" align="right" id = 'mytd'>
	<a class="actiondelrow"  id = "rowdel-3" href="javascript:void(0);" onclick="delerow(this.id,2);">-X&#243;a d&#242;ng</a>  
	</td>
</tr>
<tr class="mydatarow" rowspan = "2">
	<td valign="top"><input type="text" style="vertical-align:top" name="tkdu" value="" id="tkdu-4" size = "10" onkeyup="ShowHint(this.value, '{$dmtks}', 'txtHintMATK2', this.id, '&nbsp; &nbsp; &nbsp;')" onblur="ExitMa(this.id,'txtHintMATK2', '{$dmtks}')" class="textField" /><div id lblMATK  style="font-size:11px" ></div></td>

	<td valign="top"><input size = "10" style="vertical-align:top"  type="text" name="chitiettkdu" value="" id="chitiettkdu-4" class="textField" onkeyup="ShowHintCTTK(this.value, '{$dmtkCTs}','{$dmdvs}', '{$dmdvs}', this.id, '&nbsp; &nbsp; &nbsp;')" 
	onblur="ExitMaCTTK(this.id,'{$dmtkCTs}','{$dmdvs}', '{$dmdvs}')" /><div id lblCTTKDU  style="font-size:11px" ></td>

	{if ($loaitien) != 'VND' }
		<td valign="top" class="value"><input size = "10" type="text" name="sotiennt" value="" id="sotiennt-4" style="text-align:right"   onblur="return validSoTienNT(this.value, this.id, 2)" onkeypress="return isNumberKey(event)" id="sotiennt-1" class="textField" /></td>

		<td valign="top" class="value"><input type="text" name="sotienvn" value="" id="sotienvn-4" style="text-align:right"   onblur="return validSoTienVN(this.value, this.id,3)" onkeypress="return isNumberKey(event)" class="textField" /></td>
	{else}
		<td valign="top" class="value"><input type="text" name="sotienvn" value="" id="sotienvn-4" style="text-align:right"   onblur="return validSoTienVN(this.value, this.id,2)" onkeypress="return isNumberKey(event)" class="textField" /></td>


	{/if}


	<td valign="top" class="value" ><input type="text" name="diengiai" value="" id="diengiai-4"  style="width:99%"   class="textField" /></td>
	<td valign="top" align="right" id = 'mytd'>
	<a class="actiondelrow"  id = "rowdel-4" href="javascript:void(0);" onclick="delerow(this.id,2);">-X&#243;a d&#242;ng</a>  
	</td>
</tr>

<tr class="mydatarow" rowspan = "2">
	<td valign="top"><input type="text" style="vertical-align:top" name="tkdu" value="" id="tkdu-5" size = "10" onkeyup="ShowHint(this.value, '{$dmtks}', 'txtHintMATK2', this.id, '&nbsp; &nbsp; &nbsp;')" onblur="ExitMa(this.id,'txtHintMATK2', '{$dmtks}')" class="textField" /><div id lblMATK  style="font-size:11px" ></div></td>

	<td valign="top"><input size = "10" style="vertical-align:top"  type="text" name="chitiettkdu" value="" id="chitiettkdu-5" class="textField" onkeyup="ShowHintCTTK(this.value, '{$dmtkCTs}','{$dmdvs}', '{$dmdvs}', this.id, '&nbsp; &nbsp; &nbsp;')" 
	onblur="ExitMaCTTK(this.id,'{$dmtkCTs}','{$dmdvs}', '{$dmdvs}')" /><div id lblCTTKDU  style="font-size:11px" ></td>

	{if ($loaitien) != 'VND' }
		<td valign="top" class="value"><input size = "10" type="text" name="sotiennt" value="" id="sotiennt-5" style="text-align:right"   onblur="return validSoTienNT(this.value, this.id, 2)" onkeypress="return isNumberKey(event)" id="sotiennt-1" class="textField" /></td>

		<td valign="top" class="value"><input type="text" name="sotienvn" value="" id="sotienvn-5" style="text-align:right"   onblur="return validSoTienVN(this.value, this.id,3)" onkeypress="return isNumberKey(event)" class="textField" /></td>
	{else}
		<td valign="top" class="value"><input type="text" name="sotienvn" value="" id="sotienvn-5" style="text-align:right"   onblur="return validSoTienVN(this.value, this.id,2)" onkeypress="return isNumberKey(event)" class="textField" /></td>


	{/if}


	<td valign="top" class="value" ><input type="text" name="diengiai" value="" id="diengiai-4"  style="width:99%"   class="textField" /></td>
	<td valign="top" align="right" id = 'mytd'>
	<a class="actiondelrow"  id = "rowdel-5" href="javascript:void(0);" onclick="delerow(this.id,2);">-X&#243;a d&#242;ng</a>  
	</td>
</tr>
</table>

<table id="myTotal" width = "100%" color = "Blue ">
<tr height = "40" valign="center" >
<td style = "font-weight: bold; text-align:left; vertical-align: middle;" width = "10%">T&#7893;ng c&#7897;ng:</td>

{if ($loaitien) != 'VND' }
	<td width = "20%" style = "font-weight: bold; vertical-align: middle;"><label id = "totalNT"></label>&nbsp &nbsp {$loaitien}</td>
{/if}

<td width = "20%" style = "font-weight: bold; vertical-align: middle;"  ><label id = "total"></label>&nbsp &nbsp VND </td>
<td width= "60%"></td>
</tr>
</table>



<div class="separator"></div>

<div align = "left" ><a class="action" href="javascript:void(0);" onclick="addnewrow();">+Th&#234;m d&#242;ng</a> 
</div>   

<p><input type="button" id="button_id" value="{translate key="common.save"}"  class="button defaultButton" onClick="UpdateRecordCTTMTG('{$host}', '{$username}', '{$password}', '{$databaseName}', '{$xNam}', '{$urlUpdate}');"> 

<input type="button" class="button defaultButton" value="{translate key="common.cancel"}" class="button" onclick="javascript:close_window();" /></p>
</form>

</div>

{include file="common/footer.tpl"}

</body>
</html>

	
